/*********************************************************************
* File:: SensesSampleAgent.h
* \brief The vision and hearing APIs sample.
*********************************************************************/
#pragma once
#pragma warning (disable: 4482) // Ignore non-standard extension warnings

#include "../Agent.h"
using namespace agents;


namespace agents{ namespace samples{
	/**
	* \class SensesSampleAgent
	* \brief The vision and hearing APIs sample.
	*
	* The agents respond to the following team chat messages:
	* - \c fov: Reports the field-of-view
	* - \c seeT: Reports visible teammates
	* - \c seeE: Reports visible enemies
	* - \c weapons or \c w: Reports visible weapons on the floor
	* - \c droppedBomb or \c dB: Reports whether the dropped bomb is visible
	* - \c armedBomb or \c aB: Reports whether the armed bomb is visible
	* - \c bomber or \c b: Reports whether the bomber is visible
	* - \c seeDamageInflictor or \c seeDI: Reports the damage inflictor if it can see it
	* - \c hearsBomb or \c hB: Whether can hear the bomb
	* - \c moveToHere or \c mH: Makes the agent move to the player's position. Useful to test visibility conditions
	* - \c moveToGoal or \c mG: Makes the agent move to a random goal position. Useful to test visibility conditions
	* - \c moveToWaypoint (or \c m) <waypointIndex>: Makes the agent move to an arbitrary waypoint
	* - \c seekGrenades or \c sG: Starts reporting whether grenades are visible every 1.5 secs
	* - \c stopSeekingGrenades or \c ssG: Stops reporting grenade visibility 
	*
	* \author Instituto Superior Tecnico de Lisboa, Portugal
	* \author Technical University of Lisbon, Portugal
	* 
	* \author Agentes Autonomos e Sistemas Multiagente
	* \author Autonomous Agents and Multiagent Systems
	* 
	* \version	1.0
	* \date		2006/2007
	**/
	class SensesSampleAgent: public Agent{
	public:
		SensesSampleAgent(edict_t *enity, int team, int model);
		~SensesSampleAgent();

	private:
		void think();
		void handleMessage(ICommunication::MessageRecord& record);

		bool _isSeekingGrenades;
		double _nextSeekGrenadeTime;
		bool _isAiming;
		Vector _target;
		bool _isPlantingBomb;
		bool _isMovingToTarget;
	};
}}